model.3.i.p <- plm(inclprop~past.conference.number.noIR + incidence_flag + mad_gdppc + p_polity2 + gwf_personal + gwf_party + gwf_military+first.leader+leader.size+leader.time.in.office+leader.historical.count, data=epr.final[is.na(epr.final$inclprop)==FALSE,],index=c("countries_gwid","year"),model="within",effect="twoways")
summary(model.3.i.p) 

model.3.i.pop <- plm(legippop~past.conference.number.noIR + incidence_flag + mad_gdppc + p_polity2 + gwf_personal + gwf_party + gwf_military+first.leader+leader.size+leader.time.in.office+leader.historical.count, data=epr.final[is.na(epr.final$inclprop)==FALSE,],index=c("countries_gwid","year"),model="within",effect="twoways")
summary(model.3.i.pop) 

model.4.i.p <- plm(inclprop~past.conference.number.noIR + incidence_flag + mad_gdppc + p_polity2 + gwf_personal + gwf_party + gwf_military+first.leader+leader.size+leader.time.in.office+leader.historical.count+timeSinceLastCoup, data=epr.final[is.na(epr.final$inclprop)==FALSE,],index=c("countries_gwid","year"),model="within",effect="twoways")
summary(model.4.i.p) 

model.4.i.pop <- plm(legippop~past.conference.number.noIR + incidence_flag + mad_gdppc + p_polity2 + gwf_personal + gwf_party + gwf_military+first.leader+leader.size+leader.time.in.office+leader.historical.count+timeSinceLastCoup, data=epr.final[is.na(epr.final$inclprop)==FALSE,],index=c("countries_gwid","year"),model="within",effect="twoways")
summary(model.4.i.pop) 

model.d.3.i.p.d <- plm(inclprop~past.conference.dummy.noIR + incidence_flag + mad_gdppc + p_polity2 + gwf_personal + gwf_party + gwf_military+first.leader+leader.size+leader.time.in.office+leader.historical.count, data=epr.final[is.na(epr.final$inclprop)==FALSE,],index=c("countries_gwid","year"),model="within",effect="twoways")
summary(model.d.3.i.p.d) 

model.d.3.i.pop.d <- plm(legippop~past.conference.dummy.noIR + incidence_flag + mad_gdppc + p_polity2 + gwf_personal + gwf_party + gwf_military+first.leader+leader.size+leader.time.in.office+leader.historical.count, data=epr.final[is.na(epr.final$inclprop)==FALSE,],index=c("countries_gwid","year"),model="within",effect="twoways")
summary(model.d.3.i.pop.d) 

model.d.4.i.p.d <- plm(inclprop~past.conference.dummy.noIR + incidence_flag + mad_gdppc + p_polity2 + gwf_personal + gwf_party + gwf_military+first.leader+leader.size+leader.time.in.office+leader.historical.count+timeSinceLastCoup, data=epr.final[is.na(epr.final$inclprop)==FALSE,],index=c("countries_gwid","year"),model="within",effect="twoways")
summary(model.d.4.i.p.d) 

model.d.4.i.pop.d <- plm(legippop~past.conference.dummy.noIR + incidence_flag + mad_gdppc + p_polity2 + gwf_personal + gwf_party + gwf_military+first.leader+leader.size+leader.time.in.office+leader.historical.count+timeSinceLastCoup, data=epr.final[is.na(epr.final$inclprop)==FALSE,],index=c("countries_gwid","year"),model="within",effect="twoways")
summary(model.d.4.i.pop.d) 

coef.Names.2.d <- c("Conference Attendance Count","Civil War","GDP per capita","Polity","Personalist Regime","Party Regime","Military Regime","First Leader","Leader Group Size","Leader Time in Office","Leader Count","Time Since Last Coups","Conference Attendance")
model.Names.2.d <- c("Proportion incl. groups","Proportion incl. pop","Proportion incl. groups","Proportion incl. pop","Proportion incl. groups","Proportion incl. pop","Proportion incl. groups","Proportion incl. pop")

print(
texreg(list(model.3.i.p,model.3.i.pop,model.4.i.p,model.4.i.pop,model.d.3.i.p.d,model.d.3.i.pop.d,model.d.4.i.p.d,model.d.4.i.pop.d),use.packages=FALSE,dcolumn=TRUE,custom.coef.names=coef.Names.2.d,custom.model.names=model.Names.2.d,stars = c(0.01, 0.05, 0.1),digits=3,scalebox=0.4,caption="Alternative coding of conference attendance. Linear fixed effects models include a binary indicator of conference attendance. Outcome variables: Proportion of included groups/population. Unit of analysis is the country-year. All models include year and country fixed effects.",label="table:mainTable:dummy",caption.above=TRUE)
)
